package com.skwen.delivery.superdelivery.deliveryOrder;

import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.support.annotation.Nullable;

import com.skwen.delivery.superdelivery.BaseActivity;
import com.skwen.delivery.superdelivery.R;
import com.skwen.delivery.superdelivery.databinding.SendDeliveryOrderBinding;
import com.skwen.delivery.superdelivery.deliveryOrder.component.DaggerOrderConponent;
import com.skwen.delivery.superdelivery.deliveryOrder.component.OrderConponent;
import com.skwen.delivery.superdelivery.deliveryOrder.presenter.OrderPresenter;

import javax.inject.Inject;

import dagger.Lazy;

/**
 * Created by skwen on 2017/11/25.
 * SuperDelivery
 */

public class SendDeliveryOrder extends BaseActivity {


    @Inject
    Lazy<OrderPresenter> mOrderPresenterLazy;

    SendDeliveryOrderBinding mOrderBinding;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mOrderBinding = DataBindingUtil.setContentView(this, R.layout.send_delivery_order);
        OrderConponent conponent = DaggerOrderConponent
                .builder()
                .build();
        conponent.inject(this);
        mOrderBinding.waitReceive.setOnClickListener(view -> {
            mOrderPresenterLazy.get().getSendOrders();
        });
    }
}
